<template>
  <div class="goods-box" style="background-color: #f4f4f4">
    <div class="gengduo">
      <div class="gengduo1">
        <div
          v-for="(b, index) in arr"
          :key="index"
          style="width: 99%; background-color: #fff"
        >
          <img :src="b.img" style="width: 100%" />
          <p>{{ b.name }}</p>
          <p>
            <van-icon name="clock" style="padding-right: 0.05rem" />{{
              b.miaoshu1
            }}<van-icon
              name="warning"
              style="padding-left: 0.1rem; padding-right: 0.05rem"
            />{{ b.miaoshu2 }}
          </p>
          <div
            style="
              display: flex;
              justify-content: space-between;
              padding-bottom: 0.11rem;
            "
          >
            <p style="font-size: 0.13rem; padding-left: 0.1rem; color: #ccc">
              <van-icon name="friends" />{{ b.username }}
            </p>
            <span
              style="font-size: 0.12rem; margin-right: 0.11rem; color: #c4c4c4"
              ><van-icon name="good-job-o" size=".17rem" />{{ b.number }}</span
            >
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "goodshaoxie",
  props: {
    type: String,
  },
  data() {
    return {
      typeObj: {
        left: "左",
        right: "右",
      },
      arr: [],
    };
  },
  created() {
    axios({
      url: "/Fashion",
      method: "get",
      params: {
        type: this.type,
      },
    }).then((res) => {
      this.arr = res.data;
      console.log(res.data);
    });
  },
};
</script>
<style scoped>
.gengduo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.gengduo div {
  margin-top: 0.1rem;
}
.gengduo p:nth-child(2) {
  font-size: 0.17rem;
  padding-left: 0.1rem;
}
.gengduo p:nth-child(3) {
  margin-top: 0.16rem;
  padding-left: 0.1rem;
  font-size: 0.13rem;
}
</style>